//
//  IPWan.m
//  MHO
//
//  Created by Hien NV on 12/13/14.
//  Copyright (c) 2014 maihoang. All rights reserved.
//

#import "IPWan.h"
#import "Lib.h"

@implementation IPWan
+ (IPWan*)ipWanWithDictionary:(NSDictionary *)dictionary {
    return [[self alloc] initWithDictionary:dictionary];
}

- (id)initWithDictionary:(NSDictionary *)dictionary {
    self = [super init];
    if (self) {
        self.ipId = strCheckNull(dictionary[kIpWanId]);
        self.ipAddress = strCheckNull(dictionary[kIpWanAddress]);
        self.des = strCheckNull(dictionary[kIpWanDes]);
        self.status = [numberCheckNull(dictionary[kIpWanStatus]) boolValue];
    }
    return self;
}
@end
